package com.jr.service.impl;

import com.jr.entry.PersonalInformation;
import com.jr.entry.User;
import com.jr.mapper.PersonalInformationMapper;
import com.jr.service.PersonalInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonalInformationServiceImpl implements PersonalInformationService {

    @Autowired
    private PersonalInformationMapper pim;

    public boolean updateInformation(PersonalInformation personalInformation) {
        return pim.updateInformation(personalInformation)>0?true:false;
    }

    public Integer insertInformation(PersonalInformation personalInformation) {
        return pim.insertInformation(personalInformation);
    }

    public PersonalInformation selectInformation(User user) {
        return pim.selectInformationByPhone(user);
    }

    @Override
    public User selectUserInformation(User user) {
        return pim.selectUserInformation(user);
    }
}
